package GUI;

import Market.GenCo;
import Market.ACEWEMmodel;
import sim.display.Console;
import sim.display.GUIState;
import sim.engine.SimState;
import sim.engine.Steppable;


/**
 * 
 * @author 
 *
 */
public class ACEWEMGUI extends GUIState 
{
	
	private ACEWEMmodel market;

	/**
	 * 
	 * @param state
	 */
	public ACEWEMGUI(SimState state) 
	{
		super(state);
		market=(ACEWEMmodel)state;		
	}

	
  /**
  * 	
  */
  public void makeGenCoLearn()
  {
	final Steppable updater = new Steppable()
	{	
		public void step(SimState simState) 
		{
			market.makeGenCoLearn();			
		}
		
	};
	this.scheduleImmediatelyAfter(updater);
   }
  
  /** this gives the 'model' tab in the consol of the GUI */
  public Object getSimulationInspectedObject()
  {
  	return state;
  }


	/**
	 * 
	 * @param args
	*/
	public static void main(String[] args)
	{	 
	// ACEWEMmodel market = new ACEWEMmodel(System.currentTimeMillis()); 
		ACEWEMmodel market = new ACEWEMmodel((long)100); 
     market.start();
	 ACEWEMGUI gui =new ACEWEMGUI(market);
	 Console c = new Console(gui);
	 c.setVisible(true);
     market.finish();
	}

}
